#define _CRT_SECURE_NO_WARNINGS 1

// https://ac.nowcoder.com/acm/problem/226303

#include <iostream>
using namespace std;

typedef long long int LL;

const int N = 1e5;

LL a[N];

int n, m;
int l, r;

LL f[N];
LL k;

LL ret[N + 1];

int main()
{
	cin >> n >> m;

	for (int i = 0; i < n; ++i)
	{
		cin >> a[i];
	}

	f[0] = a[0];

	for (int i = 1; i < n; ++i)
	{
		f[i] = a[i] - a[i - 1];
	}

	while (m--)
	{
		cin >> l >> r >> k;
		f[l - 1] += k;
		f[r] -= k;
	}

	ret[0] = 0;
	// ret[1] = f[];

	for (int i = 1; i <= n; ++i)
	{
		ret[i] = ret[i - 1] + f[i - 1];
	}

	cout << endl;

	for (int i = 1; i <= n; ++i)
	{
		cout << ret[i] << ' ';
	}

	return 0;
}